/** * This method returns a set of different entities referenced in the configuration of this alert sender. */ public abstract Set<Object> getReferencedEntities(); /** * Only the plugin can "know" what kind of entities it can reference and is therefore able to read * them from the provided reader. * <p> * <b>WARNING:</b> this method must not reference any of the configuration instance fields as they will not * be initialized at the time this method is called. */ public abstract Set<Object> unmarshallReferencedEntities(Reader input); /** * This writes out the set of referenced entities (the same set as would be returned by the {@link #getReferencedEntities()} method) * to the provided writer. * <p> * <b>WARNING:</b> this method must not reference any of the configuration instance fields as they will not * be initialized at the time this method is called. */ public abstract void marshallReferencedEntities(Writer output); /** * This will update all the configuration objects to reference the replaced entities instead of the original * ones. * <p> * This method is called during configuration import where the notification is first instantiated with the * configuration coming from the origin server (i.e. with most probably incorrect reference ids, etc.). Once * the notification is instantiated with this incorrect configuration and the user provides the mapping * that maps the original entities to the entities from the local RHQ installation, this method is called * to update the incorrect configuration with the user provided corrections. * * @param entityReplacements the keys of this map are objects from {@link #getReferencedEntities()}, the values * are replacements provided by the user. If the value is null, the user provided no alternative and the * original entity must therefore be removed from the resulting configuration. */ public abstract void updateConfigurationWithEntityReplacements(Map<Object, Object> entityReplacements);